package com.xxxy.df.baseui;

import android.os.Bundle;
import android.util.Log;

import androidx.activity.EdgeToEdge;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class CycleLifeActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_cycle_life);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });
        Log.d("CycleLife","onCreate方法被执行"); // 记录生命周期方法调用
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.d("CycleLife","onStart方法被执行"); // 记录生命周期方法调用
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.d("CycleLife","onStop方法被执行"); // 记录生命周期方法调用
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d("CycleLife","onDestroy方法被执行"); // 记录生命周期方法调用
    }

    @Override
    protected void onSaveInstanceState(@NonNull Bundle outState) {
        super.onSaveInstanceState(outState);
        Log.d("CycleLife","onSaveInstanceState方法被执行"); // 记录生命周期方法调用
    }

    @Override
    protected void onRestart() {
        Log.d("CycleLife","onRestart方法被执行"); // 记录生命周期方法调用
        super.onRestart();
    }

    @Override
    protected void onPause() {
        Log.d("CycleLife","onPause方法被执行"); // 记录生命周期方法调用
        super.onPause();
    }

    @Override
    protected void onResume() {
        Log.d("CycleLife","onResume方法被执行"); // 记录生命周期方法调用
        super.onResume();
    }
}
